Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cri-tools to minikube.iso, for crictl #2404

Merged
merged 2 commits into from
Mar 30, 2018

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Jan 7, 2018

Same as kubernetes/kubeadm#613

[WARNING FileExisting-crictl]: crictl not found in system path

Added in kubernetes/kubeadm#508

kubernetes/kubernetes@bb0cd27

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 7, 2018
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@dlorenc
Copy link
Contributor

dlorenc commented Jan 8, 2018

@minikube-bot ok to test

@dlorenc
Copy link
Contributor

dlorenc commented Jan 8, 2018

Looks like the build failed with:

CGO_ENABLED=1 /usr/bin/make -j9 PATH="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin:/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin:/usr/local/go/bin:/usr/local/go/bin" AR="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ar" AS="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" LD="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" NM="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-nm" CC="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" GCC="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gcc" CPP="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-cpp" CXX="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-g++" FC="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" F77="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-gfortran" RANLIB="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ranlib" READELF="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-readelf" STRIP="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-strip" OBJCOPY="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objcopy" OBJDUMP="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/ccache /usr/bin/gcc" GCC_FOR_BUILD="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/ccache /usr/bin/gcc" CXX_FOR_BUILD="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/ccache /usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/include" CFLAGS_FOR_BUILD="-O2 -I/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/include" CXXFLAGS_FOR_BUILD="-O2 -I/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/include" LDFLAGS_FOR_BUILD="-L/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/lib -Wl,-rpath,/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-as" DEFAULT_LINKER="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/x86_64-minikube-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 " LDFLAGS="" FCFLAGS=" -O2 " FFLAGS=" -O2 " PKG_CONFIG="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/bin/pkg-config" STAGING_DIR="/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/host/x86_64-minikube-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl -C /var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/build/cri-tools-v0.2
make[2]: Entering directory '/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/build/cri-tools-v0.2'
go install \
	github.com/kubernetes-incubator/cri-tools/cmd/critest
go install \
	github.com/kubernetes-incubator/cri-tools/cmd/crictl
can't load package: package github.com/kubernetes-incubator/cri-tools/cmd/critest: cannot find package "github.com/kubernetes-incubator/cri-tools/cmd/critest" in any of:
	/usr/local/go/src/github.com/kubernetes-incubator/cri-tools/cmd/critest (from $GOROOT)
	/var/lib/jenkins/go/src/github.com/kubernetes-incubator/cri-tools/cmd/critest (from $GOPATH)
can't load package: package github.com/kubernetes-incubator/cri-tools/cmd/crictl: cannot find package "github.com/kubernetes-incubator/cri-tools/cmd/crictl" in any of:
	/usr/local/go/src/github.com/kubernetes-incubator/cri-tools/cmd/crictl (from $GOROOT)
	/var/lib/jenkins/go/src/github.com/kubernetes-incubator/cri-tools/cmd/crictl (from $GOPATH)

@afbjorklund
Copy link
Collaborator Author

ah, Jenkins sets a variable that I didn't have in my environment. Will set GOPATH explicitly...

CRI_TOOLS_GOPATH = $(@D)/_output

I wondered why that line was there, when there already was a default in the Makefile ? Now I know.

Seems like a critest got included as well...

@afbjorklund
Copy link
Collaborator Author

Nope, apparently that wasn't (entirely) it.

make[2]: Entering directory '/var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/build/cri-tools-v0.2'
go install \
        github.com/kubernetes-incubator/cri-tools/cmd/critest
go install \
        github.com/kubernetes-incubator/cri-tools/cmd/crictl
can't load package: package github.com/kubernetes-incubator/cri-tools/cmd/critest: cannot find package "github.com/kubernetes-incubator/cri-tools/cmd/critest" in any of:
        /usr/local/go/src/github.com/kubernetes-incubator/cri-tools/cmd/critest (from $GOROOT)
        /var/lib/jenkins/go/src/k8s.io/minikube/out/buildroot/output/build/cri-tools-v0.2/_output/src/github.com/kubernetes-incubator/cri-tools/cmd/critest (from $GOPATH)
Makefile:36: recipe for target 'critest' failed

When I run it locally, it creates a symlink ?

ifeq ("$(wildcard $(GOPKGDIR))","")
        mkdir -p "$(GOPKGBASEDIR)"
        ln -s "$(CURDIR)" "$(GOPKGBASEDIR)/cri-tools"
endif

@afbjorklund
Copy link
Collaborator Author

Installing crictl makes yet another preflight fail... (cri)

[ERROR CRI]: unable to check if the container runtime at "/var/run/dockershim.sock" is running: exit status 1

It is trying to run crictl -r /var/run/dockershim.sock info:

grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial unix /var/run/dockershim.sock: connect: no such file or directory"; Reconnecting to {/var/run/dockershim.sock <nil>}

@afbjorklund
Copy link
Collaborator Author

Upgraded to CRI for Kubernetes 1.9, to match the minikube 0.25.0 default version

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: afbjorklund
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: jimmidyson

Assign the PR to them by writing /assign @jimmidyson in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@afbjorklund
Copy link
Collaborator Author

That preflight error will be fixed in Kubernetes 1.10 :
kubernetes/kubernetes#58802

That is probably also when a stable "crictl" will appear...
Current version is a warm and fuzzy v1.0.0-alpha.0

We don't need critest, because it requires go anyway.
But kubeadm insists on crictl being available in path.
kubeadm init is running `crictl -r /var/run/dockershim.sock info`
before the socket actually exists (kubelet hasn't started up yet)
@afbjorklund
Copy link
Collaborator Author

Updated to "beta", which is the recommended version for k8s 1.10:
https://github.com/kubernetes-incubator/cri-tools#current-status

@dlorenc dlorenc merged commit 5b54dd6 into kubernetes:master Mar 30, 2018
@afbjorklund afbjorklund deleted the crictl branch March 30, 2018 15:37
@afbjorklund
Copy link
Collaborator Author

Well, at least the warning is gone from kubeadm 1.10, as promised...
But probably also need a newer version of cri-o, if it should work ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants